home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12847 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.8 KB  |  57 lines

  1. Path: solon.com!not-for-mail
  2. From: seebs@solutions.solon.com (Peter Seebach)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Help!  Can't read input from keyboard!
  5. Date: 2 Apr 1996 21:14:38 -0600
  6. Organization: Usenet Fact Police (Undercover)
  7. Message-ID: <4jsqeu$rur@solutions.solon.com>
  8. References: <4jq0ts$5mh@taniemarie.solon.com> <4jsmb5$mlo@newsie.dmc.com>
  9. NNTP-Posting-Host: solutions.solon.com
  10.  
  11. In article <4jsmb5$mlo@newsie.dmc.com>,  <prozac@cape.com> wrote:
  12. >In article <4jq0ts$5mh@taniemarie.solon.com>, seebs@taniemarie.solon.com 
  13. >asks something like a trick question or are the more than one Peter Seebachs
  14.  
  15. It's an April Fools' joke.
  16.  
  17. >>        #include <stdio.h>
  18. >>        int main(void) {
  19. >>                int i = 0;
  20. >>                (void) sscanf, "3", "%d", i;
  21. >>                (void) printf, "%d", i;
  22. >>                return 0;
  23. >>        }
  24.  
  25. >>Can anyone help?  I have cast sscanf() to void to prevent it from erroring.
  26.  
  27. >This is a "meaningless use of expression". Without the parens, 
  28. >the function identifier is a pointer not a call.  
  29.  
  30. Ding ding ding ding ding!
  31.  
  32. >They are like nul statements:
  33.  
  34. >    ;
  35. >    0;
  36. >    1,2;
  37. >etc.
  38.  
  39. >Use parens for normal function calls.
  40.  
  41. Very good!  At least *someone* could tell.  I'm quite happy; I was not
  42. pleased that so many people misunderstood the question.
  43.  
  44. I mean, if you compile the code, it's obvious that it's compilable, maybe
  45. even legal.  If someone shows you apparently legal code which doesn't work,
  46. *study* it before you post a correction, folks.  I'm sick of seeing blatantly
  47. wrong answers.
  48.  
  49. Prozac here wins the prize for correctly noting what's going on.
  50.  
  51. -s
  52. -- 
  53. Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
  54. C/Unix wizard -- C/Unix questions? Send mail for help.  No, really!
  55. FUCK the communications decency act.  Goddamned government.  [literally.]
  56. The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
  57.